package com.terrorism.first;

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction;

import com.terrorism.first.fragment.HomeFragment;

public class MainActivity extends FragmentActivity {


	String anything;
	//that is first line coding on project

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		addFragment(new HomeFragment());

	

	}

	public void addFragment(Fragment fragment) {

		FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
		ft.add(R.id.lnHomeContainer, fragment);
		ft.commit();
	}

	public void changeFragment(Fragment fragment) {

		FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
		ft.replace(R.id.lnHomeContainer, fragment);
		ft.addToBackStack(null);
		ft.commit();
	}


}
